kexec_file: Restrict at runtime if the kernel is locked down
authorChun-Yi Lee <joeyli.kernel@gmail.com>
Wed, 8 Nov 2017 15:11:33 +0000 (15:11 +0000)
committerSalvatore Bonaccorso <carnil@debian.org>
Thu, 18 Jul 2019 22:23:17 +0000 (23:23 +0100)
commit4c4f769be508d2f04e33110bf3e6dacf99167fae
tree56d88d9b5e6c95d67c7ef341df0293a02cf50aa8
parent4c524ece79f57ee1c1fdb01caf72b34220fb4619
kexec_file: Restrict at runtime if the kernel is locked down

When KEXEC_VERIFY_SIG is not enabled, kernel should not load images through
kexec_file systemcall if the kernel is locked down unless IMA can be used
to validate the image.

This code was showed in Matthew's patch but not in git:
https://lkml.org/lkml/2015/3/13/778

Cc: Matthew Garrett <mjg59@srcf.ucam.org>
Signed-off-by: Chun-Yi Lee <jlee@suse.com>
Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
cc: kexec@lists.infradead.org

Gbp-Pq: Topic features/all/lockdown
Gbp-Pq: Name 0008-kexec_file-Restrict-at-runtime-if-the-kernel-is-lock.patch
kernel/kexec_file.c